package com.design03_behavioral.pattern17_state.example03;

/**
 * @ClassName Client
 * @Description TODO
 * @Author zhangjunhao
 * @DATE 2023/9/9 3:25
 */
public class Client {

    public static void main(String[] args) {
        TrafficLight trafficLight = new TrafficLight();
        trafficLight.switchToYellow();
        trafficLight.switchToGreen();
        trafficLight.switchToRed();
        //黄灯亮起...时长:10秒!
        //红灯不能切换为绿灯!
        //已是红灯状态无须再切换!
    }

}
